1. Field of the Invention
The present invention relates to a method of authenticating validity of management information in a disk device, and in particular, to a method of authenticating validity of management information of a disk in a disk device.
2. Description of the Related Art
In a disk, for example, a DVD-R (digital versatile disks (DVD) recordable) on which a sequence of data items are sequentially written, a management area is disposed to record management information including a recording progress state in a data area on the disk. The disk device conducts starting processing, for example, when the device is turned on or powered or when a disk is loaded in the device. In the starting processing, the disk device reads latest management information from the management area on the disk. Since the management information thus obtained indicates recording progress in the data area, the disk device can identify a start position to additionally write data in the data area. However, since information of the recording progress does not match with the recording state of the data area in some cases, it is required in the prior art to scan the data area to confirm validity of the recording progress information obtained from the management information. Description will be given of a specific example of this operation by referring to FIGS. 4 to 7 including a process to record data on a DVD-R in an unrecorded state.
FIG. 4 conceptually shows three areas on a DVD-R. These areas are in an unrecorded state. In FIG. 4, numeral 401 indicates a power calibration area (PCA) for a disk device to determine appropriate recording power. Numeral 402 denotes a recording management area (RMA) to record recording management data (RMD) as management information. Numeral 403 denotes a data area to record data. In each area, a left-hand side corresponds to an inner circumferential side of the disk and a right-hand side corresponds to an outer circumferential side of the disk. In an actual DVD-R, the power calibration area exists at an inner-most position, the recording management area exists at an intermediate position, and the data area exists at an outer-most position. The respective areas are different in size from each other to represent recording capacity of each area. The data area 403 occupies most of the disk areas.
After the DVD-R in the unrecorded state shown in FIG. 4 is loaded in a disk device, when a host unit or a host specifies a recording mode for the disk device, the disk changes its state to a state shown in FIG. 5 according to a procedure as below.
When the host specifies the recording mode, the disk device conducts trial writing or power calibration in a power calibration area 401 to obtain appropriate writing power. Numeral 501 in the power calibration area 401 of FIG. 5 indicates a test pattern recorded by the trial writing or power calibration. According to specifications, data is written in each area on the disk in a direction from an inner-most circumference to an outer-most circumference. However, it is particularly specified that data is written in the power calibration area on the disk in a direction from an outer-most circumference to an inner-most circumference. Therefore, the test pattern 501 is recorded on an outer-most side of the power calibration area 401.
After the power calibration, the disk device records recording management data 502 in the recording management area 402, the data 502 including the recording mode of the disk specified by the host. Although not shown in FIG. 5, it is assumed that an incremental recording mode is specified as the recording mode. After the disk is set to the state shown in FIG. 5, it is first possible to record data in the data area of the disk.
FIG. 6 shows a state of the disk after data is recorded on the disk in the state of FIG. 5 in response to a data recording indication sent from the host to the disk device. Numeral 601 of FIG. 6 denotes data recorded on the disk. Numeral 602 denotes recording management data written, after the data 601 is completely recorded on the disk, by the disk device to control progress of the recording in the data area. The recording management data is not recorded each time data is recorded on the disk. Ordinarily, when the total amount of data recorded on the disk exceeds a predetermined value, the disk device records the recording management data. FIG. 6 shows a case in which the amount of data 601 exceeds a reference value specified as a criterion to record the recording management data.
FIG. 7 shows a state of the disk after two data items are recorded on the disk in the state of FIG. 6 in response to an indication of sequential recording of two data items sent from the host to the disk device. FIG. 7 shows an operation in which the host issues a request of sequential recording of a data item 701 and a data item 702 to the disk device and then the disk device sequentially records the data items 701 and 702 on the disk. In FIG. 7, the total data amount of the data items 701 and 702 is less than a reference value to additionally write another recording management data. Therefore, the disk device does not record any recording management data. In short, the latest recording management data 602 remains valid as in the state of FIG. 6. Therefore, the state of FIG. 7 indicates a case in which recording progress information in the data area obtained from the latest recording management data does not match with the actual recording state of the recording area.
Next, description will be given of processing executed by the disk device in the prior art when the disk in the state of FIG. 7 is once unloaded from the disk device and is again loaded in the disk device in the state of FIG. 7.
When the disk is loaded in the disk device, the disk device scans the recording management area 402 beginning at the inner-most position to detect a boundary between a recorded area and an unrecorded area. The disk device recognizes recording management data 602 adjacent to the detected boundary as the latest recording management data. Although the disk device recognizes that the recording management data 602 is the latest recording management data in the recording management area 402, it is impossible for the disk device to determine whether or not recording progress information obtained from the recording management data 602 matches with the actual recording state in the data area. In the example shown in FIG. 7, the recording progress information does not match with the actual recording state. However, the disk device cannot recognize the condition, i.e., the mismatching at all. In this situation, the disk device scans the data area according to the recording progress information obtained from the recording management data 602 to detect a position which is a last position of the data 702 and at which the area is changed from the recorded state to the unrecorded state. The disk device therefore determines that a position next to the last position of the data 702 is a position at which data is additionally recorded.
Next, description will be given of processing of the disk device when the disk in the state of FIG. 6 is unloaded from the disk device and is again loaded therein in the state of FIG. 6. When the disk is loaded in the disk device, the disk device scans the recording management area 402 beginning at the inner-most position to detect a boundary between a recorded area and an unrecorded area. The disk device recognizes recording management data 602 adjacent to the detected boundary as the latest recording management data. Although the disk device recognizes that the recording management data 602 is the latest one in the recording management area 402, the disk device cannot determine whether or not recording progress information obtained from the recording management data 602 matches with the actual recording state in the data area. In the example shown in FIG. 6, the recording progress information matches with the actual recording state. Therefore, inherently, it is not required to scan the data area. However, the disk device cannot recognize the condition, i.e., the matching at all. In this situation, as in the case of FIG. 7 described above, the disk device scans the data area according to the recording progress information obtained from the recording management data 602 to detect a position which is a last position of the data 601 and at which the area is changed from the recorded state to the unrecorded state. The disk device therefore determines that a position next to the last position of the data 601 is a position at which data is additionally recorded.
In the prior art, to cope with the problem of this kind, there has been proposed a method in which the upper system of the disk device includes a nonvolatile memory to keep therein a copy of management information to be recorded on the disk. Reference is made to, for example, JP-A-2002-312940, paragraphs [0057]–[0058] with reference to FIG. 5.
According to the method of the prior art, before the upper system instructs the disk device to record data on the disk, the upper system requests the disk device to report the latest management information on the disk. When the management information reported from the disk device does not match that in the nonvolatile memory, the upper system indicates the disk device to record the management information of the nonvolatile memory on the disk. Since the nonvolatile memory always keeps the latest management information, it is not required that the disk device scans the data area before the recording operation to confirm validity of the management information.
The method of the prior art is available only when the nonvolatile memory of the upper system stores management information associated with the disk on which data is to be written. If the nonvolatile memory of the upper system does not store the management information, the disk device must scan the data area regardless of validity or invalidity of the management information. The method is complicated because the upper system of the disk device manages the information, which is inherently to be managed by the disk device. When it is required to keep management information for a plurality of disks, the nonvolatile memory must include storage areas for the disks. This increases the cost necessary for the nonvolatile memory. It is required to establish a correspondence between the disks and associated management information items in the nonvolatile memory. Therefore, the procedure between the upper system and the disk device is complex.
In the prior art, the method to confirm validity of the management information of a disk is not sufficiently effective as described above. Therefore, the disk device must scan the data area on the disk. To avoid the scanning of the data area, there has also been proposed a method to manage the management information by the upper system. However, the method is not sufficiently effective because the disk device cannot manage the management information by itself.